<?php
	$link = mysqli_connect('localhost', 'root', '') or die("Failed to connect to MySQL: " . mysql_error());
	if (mysqli_connect_errno()) {
	        echo 'Failed to connect to MySQL';
	        exit;
	}
	$sql = "USE web_db";
	$query = mysqli_query($link,$sql);

	$miss_nr = $_POST['miss_nr'];

	echo $miss_nr;

	$sql = "UPDATE mission
			SET status = 'Completed'
			WHERE miss_nr = '$miss_nr'";
	$query = mysqli_query($link,$sql);

	echo $query;

	header("location:missions.php");
?>